package com.hundsun.cprs.yyt.service.report.domain;

import com.hundsun.cprs.yyt.common.enums.EnumAreaCode;
import com.hundsun.cprs.yyt.util.MoneyUtils;

import java.text.SimpleDateFormat;

public class DaliyClinchSumVo {
    private String areaCode;

    private String clinchMoneySum;

    private String clinchAmountSum;

    private String statTime;

    public DaliyClinchSumVo(DaliyClinchSum daliyClinchSum){
        if (daliyClinchSum.getAreaCode().equals(EnumAreaCode.WHOLESALE_AREA.getCode())){
            this.areaCode = "批发区";
        }else {
            this.areaCode = "零售区";
        }
        this.clinchAmountSum = daliyClinchSum.getClinchAmountSum().toString();
        this.clinchMoneySum = MoneyUtils.getMoneyFormatFen(daliyClinchSum.getClinchMoneySum());
        SimpleDateFormat dtf = new SimpleDateFormat("yyyy-MM-dd");
        this.statTime = dtf.format(daliyClinchSum.getStatTime());
    }

    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public String getClinchMoneySum() {
        return clinchMoneySum;
    }

    public void setClinchMoneySum(String clinchMoneySum) {
        this.clinchMoneySum = clinchMoneySum;
    }

    public String getClinchAmountSum() {
        return clinchAmountSum;
    }

    public void setClinchAmountSum(String clinchAmountSum) {
        this.clinchAmountSum = clinchAmountSum;
    }

    public String getStatTime() {
        return statTime;
    }

    public void setStatTime(String statTime) {
        this.statTime = statTime;
    }
}
